#pragma once
#include "ps_support.h"

//converts a character to upper/lower case
char ps_charucase(char c);
char ps_charlcase(char c);

//returns the size of a string
strsize ps_strlen(str s);

//returns number of occurences of char c in a string
u16 ps_charinstr (str s1, char c);

//copies a string
void ps_strcpy(str dest, str src);
void ps_strncpy(str dest, str src, strsize count);
void ps_strcpysub(str dest, str src, strsize start, strsize end);

//adds a string to anothing
void ps_strcat(str dest, str src);
void ps_strncat(str dest, str src, strsize count);

//tests if strings are equal
bool ps_strequal (str s1, str s2);
bool ps_strnequal (str s1, str s2, strsize count);

//replaces upper/lower case characters in a string with lower/upper case characters
void ps_strucase(str s);
void ps_strlcase(str s);

//searches a string for a character
str ps_strchr(str s, char c);
str ps_strrchr(str s, char c);

//searches a string for a substring
str ps_strstr(str s, str toFind);

//compares strings ignoring character cases
bool ps_strcasecmp (str s1, str s2);
bool ps_strncasecmp (str s1, str s2, strsize count);

//tests if a string is an int
bool ps_strisint(str s);
bool ps_strisfloat(str s);

s32 ps_strtoint(str s);
/*
int ps_atoi (str *str);

float ps_atof (str *str);
*/